home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15485 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: wagner.spc.videotron.ca!news
  2. From: yvesb@sp.rp.collegebdeb.qc.ca (Yves Bergeron)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Fastest Sorting Algorithm?
  5. Date: Sat, 06 Apr 1996 13:01:31 GMT
  6. Organization: College de Bois-de-Boulogne, Montreal
  7. Message-ID: <4k5q1s$h53@wagner.spc.videotron.ca>
  8. References: <Dou55w.7MB@novice.uwaterloo.ca> <DpAxtI.3w9@undergrad.math.uwaterloo.ca>
  9. NNTP-Posting-Host: 205.151.5.53
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. most of the time, It's depend of the number of element and if the 
  13. data are partialy sorted or not
  14.  
  15. YVes
  16.  
  17.  
  18. sckettle@undergrad.math.uwaterloo.ca (Steve Kettle) wrote:
  19.  
  20. >In article <Dou55w.7MB@novice.uwaterloo.ca>,
  21. >Gerald Wang  <GTWANG@HELIX.Watstar.UWaterloo.CA> wrote:
  22. >>A classmate was recently asked during a job interview what is the fastest 
  23. >>method to sort an array of numbers. He replied "Use a quicksort." They 
  24. >>asked "And how would you make it faster still?" He couldn't come up with 
  25. >>much...end of interview.
  26. >>
  27. >>I know it's a vague question... Any ideas on what they were asking? Or 
  28. >>what the right answer is?
  29. >>
  30. >>Gerald
  31. >>
  32. >>-------------------------------------------------------------------------
  33. >>Gerald Wang
  34. >>http://www.csclub.uwaterloo.ca/~gtwang
  35. >>
  36. >>
  37.  
  38. >Well you could use a type of bucket sorting algorithm which is faster than
  39. >quicksort when sorting integers.  How to make it faster I don't know - you
  40. >don't really make algortithms faster you make code implementations of
  41. >algorithms faster. Mybe they meant tweaking stratigies for quicksort like how
  42. >to choose a pivot element.  Who knows. 
  43.  
  44. >-- 
  45.  
  46.  
  47.